package com.gongj.populateBean.autowired;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


public class Maiin {

	public static void main1(String[] args) {
		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppApplication.class);
		UserService bean = context.getBean(UserService.class);
		bean.test();
	}

	public static void main3(String[] args) {
		ClassPathXmlApplicationContext context =
				new ClassPathXmlApplicationContext("spring-config2.xml");
		//AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppApplication.class);
		//A bean = context.getBean(A.class);
		//B bean = context.getBean(B.class);
		//bean.test();
//		bean.otherAutowiring();


	}
	public static void main(String[] args) {
		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppApplication.class);
		TypeManyTest bean = context.getBean(TypeManyTest.class);
		bean.test();
	}
}
